package com.young.core.domain;


import java.io.Serializable;
import java.util.Objects;

/**
 * @description：业务端节点信息
 * @author: yangyahui01
 * @date: 11/27/24 5:54 PM
 */
public class Node implements Serializable {

    private Long id;

    private String ip;

    private Integer port;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    @Override
    public int hashCode(){
        return Objects.hash(ip,port);
    }

    @Override
    public boolean equals(Object obj) {
        if(obj == null) {
            return false;
        }
        return this.hashCode() == obj.hashCode();
    }
}
